<?php
$this->breadcrumbs=array(
	'Banks',
);?>
<div class="section">

<?php foreach(Yii::app()->user->getFlashes() as $key => $message) :
    $class = 'messages ';
    $switch = explode('_', $key);
    $switch = $switch[0];
    switch ($switch){
        case 'suc':
            $class.= 'green';
        break;
        case 'fail':
            $class.= 'red';
        break;
        default:
            $class.= 'blue';
        break;
    } ?>
    <br/>
    <br/>
    <div class="<?= $class?>" title="Клик, чтобы скрыть" onclick="$(this).fadeOut();" style="cursor:pointer;float:left;clear: both;padding-right: 10px;">
        <span></span>
        <?= $message;?> 
    </div>    
<?php endforeach ?>
        <div class="box">
            <div class="title">
                <h2><?= $title?></h2>
                <span class="hide"></span>
            </div>
<div class="content">
<br/><br/>
<? if (sizeof($model) != 0): ?>
<?=CHtml::beginForm(); ?>
<table cellspacing="0" cellpadding="0" border="0" class="table-all">
                    <thead> 
                        <tr> 
                            <th></th>
                            <th class="header"><?=Yii::t('app','Название банка')?></th>
                            <th></th>
                        </tr> 
                    </thead>
                    <tbody>
<? 
$i = 0;
foreach($model as $bank):
    $i++;
    $rowClass = ($i % 2 == 0)?'even':'odd';
?>
    <tr class="<?= $rowClass ?>">
        <td></td>
        <td><?php echo CHtml::link($bank->title, array('banks/moderate','id'=>$bank->id)) ?></td>
        <td>                                
            <?php echo CHtml::link('<img src="'.Yii::app()->theme->baseUrl.'/gfx/icon-edit.png" alt="'.Yii::t('app','Модерировать').'" />', 
                                   array('banks/moderate','id'=>$bank->id)
            ) ?>
        </td>
    </tr>
<?endforeach?>
</tbody>
</table>
                <div id="pager" class="pager">

                        <div>
                            <img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-first.gif" class="first" alt="First">
                            <img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-prev.gif" class="prev" alt="Previous">
                            <input type="text" class="pagedisplay">
                            <img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-next.gif" class="next" alt="Next">
                            <img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-last.gif" class="last" alt="Last">
                        </div>

                            <select class="pagesize" tabindex="-1">
                                                    <option selected="selected" value="5">5</option>
                                                    <option value="10">10</option>
                                                    <option value="25">25</option>
                                                    <option value="50">50</option>
                                                </select>
                     
                       
                        <?=CHtml::endForm(); ?>
</div>
<? endif ?>
</div>
</div>
